const { Router } = require('express')
const express = require('express')
//路由容器
const find = express.Router()
const axios = require('axios')

find.put('/user/forgetPassword', (req, res) => {
    let {code,email,newPassword}=req.body.params
    console.log(req.body.params)
    axios({
        method:'put',
        url : 'user/forgetPassword',
        params:{
            code:'codeqq',
            email:email,
            newPassword:newPassword
        }
    }).then(function(data){
        res.status(200).json({
            data:data.data,
            code:0
        })
    }).catch(function(err){
        console.log(err)
        res.status(500).json({
            msg:err
        })
    })
 })

module.exports=find;